<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>排盘结果</title>
    <link rel="icon" href="{{ url_for('static', filename='images/girls.ico') }}" type="image/x-icon">
    <link rel="stylesheet" type="text/css" href="{{ url_for('static', filename='styles.css') }}">
</head>
<body>
    <div class="container">
        <div class="area1">
            <a href="#dialog"><img src="{{ url_for('static', filename='images/dialog_icon_30_30.png') }}" alt="Dialog"></a>
            <a href="#database"><img src="{{ url_for('static', filename='images/database_icon_30_30.png') }}" alt="Database"></a>
            <a href="#profile"><img src="{{ url_for('static', filename='images/profile_icon_30_30.png') }}" alt="Profile"></a>
        </div>
        <div class="area2">
            <input type="text" id="search" placeholder="Search...">
            <select>
                <option value="">父母</option>
                <option value="">兄弟</option>
                <option value="">子孙</option>
                <option value="">妻财</option>
                <option value="">官鬼</option>
                <option value="">世</option>
                <option value="">应</option>
            </select>
            <select>
                <option value="">文书 快递</option>
                <option value="">文书 招标</option>
                <option value="">婚姻 占夫 男朋友</option>
                <option value="">婚姻 占妻 女朋友</option>
                <option value="">官鬼</option>
                <option value="">世</option>
                <option value="">应</option>
            </select>
            <!-- Add more select boxes and listviews here -->
        </div>
        <div class="area3">
            <div class="text-box">
                {{ text|replace(" ", "&nbsp;")|replace("\n", "<br>")|safe }}<!--  -->
            </div>
            <button onclick="saveText()">保存卦文</button>
            <button onclick="location.href='{{ url_for('mainpage') }}'">返回排盘页面</button>
        </div>
    </div>

    <script src="{{ url_for('static', filename='scripts.js') }}"></script>

    <script type="text/javascript">
        document.getElementById('search').addEventListener('keydown', function(event) {
            if (event.key === 'Enter') {
                // Trigger search logic here
            }
        });

        function saveText() {
            // Implement saveText functionality here
        }

        var text = {{ text|safe }};
        console.log(text);
    </script>
</body>
</html>